package com.tngames.angrytunisian.game.core.entity;

import org.jbox2d.dynamics.Body;
import org.jbox2d.dynamics.World;

public abstract class StaticPhysicsEntity extends Entity implements PhysicsEntity {

	private Body body;

	public StaticPhysicsEntity(EntityEngine entityEngine,
			float px, float py, float pangle) {
		super(entityEngine, px, py, pangle);
		body = initPhysicsBody(entityEngine.getWorld(), x, y, angle);
	}

	protected abstract Body initPhysicsBody(World world, float x, float y,
			float angle);

	@Override
	public void initPreLoad(EntityEngine entityEngine) {
		// TODO Auto-generated method stub

	}

	@Override
	public void initPostLoad(EntityEngine entityEngine) {
		entityEngine.staticLayerBack.add(layer);
	}

	@Override
	public Body getBody() {
		return body;
	}

}
